<%@ page import="java.util.List" %>
<%@ page import="src.bd.Reclamacoes" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%-- 
    Document   : BlogPoliticaTransparente
    Created on : 23/04/2011, 20:47:32
    Author     : Jeferson
--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:useBean id="reclamacoes" class="bean.ReclamacoesBean" scope="session"  />

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Politica Transparente</title>

<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
<script type="text/javascript" src="/javascript/main.js"> </script>

</head>

<%
    String action = request.getParameter("action");
    if ((action!=null)&&(!action.equals(""))){
        if (action.equals("salvar")){
            reclamacoes.salva(request);
        }
        if (action.equals("deleteAll")){
            reclamacoes.deleteAll();
        }

    }



%>
<body  onload="init();">

    <form method="post" id="myform" action="/blog/BlogPoliticaTransparente.jsp">
    <input type="hidden" id="action" name="action" value="" />
<div class="container">
  <div class="header">
      <div class="p"><a href="#" onclick="submit()">Politica
    </a></div><div class="t"><a href="#" onclick="submit()">Transparente.</a></div>
    <!-- end .header --></div>
  <!--
  <div class="sidebar1">
    <ul class="nav">
      <li><a href="#">Promessas</a></li>
      <li><a href="#">Reclamações</a></li>
      <li><a href="#">Ações</a></li>
      <li class="sl"><a href="#">Políticos</a></li>
    </ul>
    </br>

    <!-- end .sidebar1 -->
  </div> -->
  <div class="content">
  	<div id="divflutuante" class="div_flutuante">
    	Nome do Político : <input id="nomePolitico" name="nomePolitico" type="text" />   <br/><br/>
        Foi Prometido Que : <textarea id="prometido" name="prometido" class="textoPrometido" ></textarea><br/><br/>
        <input value="Salvar ... " type="button" onclick="salvar();" />
        <input value="Cancelar. " type="button" onclick="cancelar();" />
    </div>
	<div class="menuSup"><a onClick="javascript: mostradivflutuante();" href="#"> Nova </a></div>
    <div class="linha">
    	<h1> Eu Prometo Que !!!</h1>

<%
            List<Reclamacoes> lista = reclamacoes.lista();
            
            if (lista.size()>0){
                int i = 1;
                for (Reclamacoes item : lista) {%>
        <div class="col<%=i%>">
                    
            <div class="tituloColuna">
                    <%=item.getNomePolitico()%>
            </div>
            <%=item.getPrometido()%><%=((new SimpleDateFormat("dd/MM/yyyy")).format(item.getData()))%>
        </div>
        <%
                    if (i==3){
                        i=1;
                    } else {
                        i++;
                    }
                }
            }
%>
        <!-- <div class="col1">
        	<div class="tituloColuna">
            	col1
            </div>
            <br/>
        	.sdlfma~ld  mfãslkfd mãlsk mdfãlskm df~laks mdf~las kmfd~ lasdf
        </div>
        <div class="col2">
        	<div class="tituloColuna">
            	col1
            </div>
            <br/>
        	.sdlfma~ld  mfãslkfd mãlsk mdfãlskm df~laks mdf~las kmfd~ lasdf
        </div>
        <div class="col3">
        	<div class="tituloColuna">
            	col1
            </div>
            <br/>
        	.sdlfma~ld  mfãslkfd mãlsk mdfãlskm df~laks mdf~las kmfd~ lasdf
        </div> -->
  	</div>

    <!-- end .content --></div>
  <div class="footer">
    <p>This .footer contains the declaration position:relative; to give Internet Explorer 6 hasLayout for the .footer and cause it to clear correctly. If you're not required to support IE6, you may remove it.</p>
    <!-- end .footer --></div>
  
</form>
</body>
</html>

